package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.Work;
import com.ruoyi.system.mapper.WorkMapper;
import com.ruoyi.system.service.IWorkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.DeleteMapping;

import java.util.List;
@Service
public  class WorkServiceImpl implements IWorkService {
    @Autowired
    private WorkMapper workMapper;
    @Override
    public List<Work> selectAll() {
    List<Work> workList =workMapper.selectAll();
        return workList;
    }

    @Override
    public int addWork(Work work) {
        return workMapper.addWork(work);
    }

    @Override
    public int editWork(Work work) {
        return workMapper.editWork(work);
    }

    @Override
    public Long deleteWork(Long workId) {
        return workMapper.deleteWork(workId);
    }


    // 需要确认IWorkService接口中的selectData方法返回类型
// 假设接口中返回类型为List<Work>，则无需修改
    @Override
    public List<Work> selectData(Work work) {
        return workMapper.selectData(work);
    }



}
